package com.paipai.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldIndex;
import org.springframework.data.elasticsearch.annotations.FieldType;

import com.alibaba.fastjson.annotation.JSONField;
@Document(indexName = "product", type = "pro", shards = 1, replicas = 0)
public class EsProduct implements Serializable {
    @Id
    private Integer id;

    private Integer serial;
    @Field(type = FieldType.String) //text 参与分词  分词器 ik分词器
    @Column(name = "pro_name")
    private String proName;

    
    @Field(type = FieldType.String) //text 参与分词  分词器 ik分词器
    private String info;
   
    @Field(type = FieldType.String) //auto 自动判断类型  参与分词  分词器 ik分词器
    private String type;
    
   
    private String img;
   
    @Field(type = FieldType.Float)  //数字类型
    @Column(name = "starting_price")
    private Float startingPrice;

    @Field(type = FieldType.Float)  //数字类型
    @Column(name = "minimum_price")
    private Float minimumPrice;

    @Field(type = FieldType.Float)  //数字类型
    @Column(name = "present_price")
    private Float presentPrice;
    
    @Field(type = FieldType.Date)  //时间类型
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    @Column(name = "start_time")
    private Date startTime;
   
    @Field(type = FieldType.Date)  //时间类型
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date deadline;
    
    @Column(name = "seller_id")
    private Integer sellerId;

    @Column(name = "seller_name")
    private String sellerName;

    private Integer putaway;
    
    private Integer frequency;

    @Column(name = "biduser_id")
    private Integer biduserId;

    @Column(name = "biduser_name")
    private String biduserName;

    private Integer heatcount;
    
    @Field(type = FieldType.String) //auto 自动判断类型  参与分词  分词器 ik分词器
    private String region;

    private static final long serialVersionUID = 1L;

    /**
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * @return serial
     */
    public Integer getSerial() {
        return serial;
    }

    /**
     * @param serial
     */
    public void setSerial(Integer serial) {
        this.serial = serial;
        
        
    }

    /**
     * @return pro_name
     */
    public String getProName() {
        return proName;
    }

    /**
     * @param proName
     */
    public void setProName(String proName) {
        this.proName = proName;
    }

    /**
     * @return info
     */
    public String getInfo() {
        return info;
    }

    /**
     * @param info
     */
    public void setInfo(String info) {
        this.info = info;
    }

    /**
     * @return type
     */
    public String getType() {
        return type;
    }

    /**
     * @param type
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * @return img
     */
    public String getImg() {
        return img;
    }

    /**
     * @param img
     */
    public void setImg(String img) {
        this.img = img;
    }

    /**
     * @return starting_price
     */
    public Float getStartingPrice() {
        return startingPrice;
    }

    /**
     * @param startingPrice
     */
    public void setStartingPrice(Float startingPrice) {
        this.startingPrice = startingPrice;
    }

    /**
     * @return minimum_price
     */
    public Float getMinimumPrice() {
    	
    	String intern = "".intern();
        return minimumPrice;
    }

    /**
     * @param minimumPrice
     */
    public void setMinimumPrice(Float minimumPrice) {
        this.minimumPrice = minimumPrice;
    }

    /**
     * @return present_price
     */
    public Float getPresentPrice() {
        return presentPrice;
    }

    /**
     * @param presentPrice
     */
    public void setPresentPrice(Float presentPrice) {
        this.presentPrice = presentPrice;
    }

    /**
     * @return start_time
     */
    public Date getStartTime() {
        return startTime;
    }

    /**
     * @param startTime
     */
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    /**
     * @return deadline
     */
    public Date getDeadline() {
        return deadline;
    }

    /**
     * @param deadline
     */
    public void setDeadline(Date deadline) {
        this.deadline = deadline;
    }

    /**
     * @return seller_id
     */
    public Integer getSellerId() {
        return sellerId;
    }

    /**
     * @param sellerId
     */
    public void setSellerId(Integer sellerId) {
        this.sellerId = sellerId;
    }

    /**
     * @return seller_name
     */
    public String getSellerName() {
        return sellerName;
    }

    /**
     * @param sellerName
     */
    public void setSellerName(String sellerName) {
        this.sellerName = sellerName;
    }

    /**
     * @return putaway
     */
    public Integer getPutaway() {
        return putaway;
    }

    /**
     * @param putaway
     */
    public void setPutaway(Integer putaway) {
        this.putaway = putaway;
    }

    /**
     * @return frequency
     */
    public Integer getFrequency() {
        return frequency;
    }

    /**
     * @param frequency
     */
    public void setFrequency(Integer frequency) {
        this.frequency = frequency;
    }

    /**
     * @return biduser_id
     */
    public Integer getBiduserId() {
        return biduserId;
    }

    /**
     * @param biduserId
     */
    public void setBiduserId(Integer biduserId) {
        this.biduserId = biduserId;
    }

    /**
     * @return biduser_name
     */
    public String getBiduserName() {
        return biduserName;
    }

    /**
     * @param biduserName
     */
    public void setBiduserName(String biduserName) {
        this.biduserName = biduserName;
    }

    /**
     * @return heatcount
     */
    public Integer getHeatcount() {
        return heatcount;
    }

    /**
     * @param heatcount
     */
    public void setHeatcount(Integer heatcount) {
        this.heatcount = heatcount;
    }

    /**
     * @return region
     */
    public String getRegion() {
        return region;
    }

    /**
     * @param region
     */
    public void setRegion(String region) {
        this.region = region;
    }

	@Override
	public String toString() {
		return "Product [id=" + id + ", serial=" + serial + ", proName=" + proName + ", info=" + info + ", type=" + type
				+ ", img=" + img + ", startingPrice=" + startingPrice + ", minimumPrice=" + minimumPrice
				+ ", presentPrice=" + presentPrice + ", startTime=" + startTime + ", deadline=" + deadline
				+ ", sellerId=" + sellerId + ", sellerName=" + sellerName + ", putaway=" + putaway + ", frequency="
				+ frequency + ", biduserId=" + biduserId + ", biduserName=" + biduserName + ", heatcount=" + heatcount
				+ ", region=" + region + "]";
	}
    
    
    
}